package sspersonserver.db;

import sspersonserver.LoginData;
import sspersonserver.subjects.*;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: Double
 * Date: 25.01.12
 * Time: 16:49
 * To change this template use File | Settings | File Templates.
 */
public interface IDB
{

	public ArrayList<Person> getPersonList();
	public ArrayList<Person> getPersonList(int startIndex, int endIndex);
	public ArrayList<Country> getCountry();
	public ArrayList<City> getCity(int id);
	public ArrayList<Street> getStreet(int id);
	public ArrayList<Address> getAddress();
	public void addCountry(Country country);
	public void addCity(City city);
	public void addStreet(Street street);
	public void removeCountry(Country country);
	public void removeCity(City city);
	public void removeStreet(Street street);
	public FullPerson getFullPerson(int id);
	public void saveFullPerson(FullPerson fullPerson);
	public void save(ArrayList<Person> persons);
	public void update(FullPerson fullPerson);
	public void delete(FullPerson fullPerson);
	public int checkAuth(LoginData loginData);
	public ArrayList<PhoneType> getPhoneType();
	public void addPhoneType(PhoneType phoneType);
	public void removePhoneType(PhoneType phoneType);
	/*Подключение к базе*/
	public void connect(String ip, String database);
	public void disconnect();


}
